﻿using RG.Common;
using RG.Common.WPF;
using RG.Common.WPF.Dialogs;
using RG.Common.WPF.Frames;
using RG.Common.WPF.Workplaces;
using Microsoft.Practices.Unity;

namespace RG.Common.WPF
{
    public static class IUnityContainer_Common_WPF
    {
        public static IUnityContainer Common_WPF(this IUnityContainer cfg)
        {
            cfg.
                RegisterType<IFrameSettingsService, FrameSettingsService>().
                RegisterType<IView<MultiFrameWorkplaceVM>, MultiFrameWorkplace>().
                RegisterType<IView<OneFrameWorkplaceVM>, OneFrameWorkplace>().
                RegisterType<IView<DialogWindowVM>, DialogWindow>().
                RegisterType<IView<EditableObjectDlgVM>, EditableObjectDlg>().
                RegisterType<IView<PreviewDlgVM>, PreviewDlg>().
                RegisterType<IView<TextBoxDialogVM>, TextBoxDialog>().
                RegisterType<IView<ColumnDataGridPresetDialogVM>, ColumnDataGridPresetDialog>().
                RegisterType<IView<GenericGridFrameVM>, GenericGridFrame>().
                RegisterType<IView<ReportPrintFrameVM>, ReportFrameImpl<ReportPrintFrameVM>>().
                RegisterType<IAlarmDispatcher, AlarmDispatcher>().
                RegisterType<IView<FilterSettingsDialogVM>, FilterSettingsDialog>().
                RegisterType<IView<ActiveErrorBoxVM>, ActiveErrorBox>();

            return cfg;
        }
    }
}
